projects
/
xen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
02af4f3
)
[XEND] Add a convenience function for UUID generation
author
Alastair Tse
<atse@xensource.com>
Thu, 5 Oct 2006 16:29:19 +0000
(17:29 +0100)
committer
Alastair Tse
<atse@xensource.com>
Thu, 5 Oct 2006 16:29:19 +0000
(17:29 +0100)
Signed-off-by: Alastair Tse <atse@xensource.com>
tools/python/xen/xend/uuid.py
patch
|
blob
|
history
diff --git
a/tools/python/xen/xend/uuid.py
b/tools/python/xen/xend/uuid.py
index 401540bc6e372f2b8c76f1a587b5e3cd3505b497..7fe52cb335f2e80287d8589ce780d307bd697625 100644
(file)
--- a/
tools/python/xen/xend/uuid.py
+++ b/
tools/python/xen/xend/uuid.py
@@
-54,10
+54,6
@@
def getUuidRandom():
uuidFactory = getUuidRandom
-def create():
- return uuidFactory()
-
-
def toString(u):
return "-".join(["%02x" * 4, "%02x" * 2, "%02x" * 2, "%02x" * 2,
"%02x" * 6]) % tuple(u)
@@
-65,3
+61,9
@@
def toString(u):
def fromString(s):
s = s.replace('-', '')
return [ int(s[i : i + 2], 16) for i in range(0, 32, 2) ]
+
+def create():
+ return uuidFactory()
+
+def createString():
+ return toString(create())